﻿@model BrnMall.Web.StoreAdmin.Models.DisGradeModel

@section header{
    <title>编辑代理商等级-代理商等级</title>
    <link type="text/css" rel="stylesheet" href="/admin_store/css/site.css" />
    <script type="text/javascript" src="/admin_store/scripts/jquery.js"></script>
    <script type="text/javascript" src="/admin_store/scripts/jquery.validate.js"></script>
    <script type="text/javascript" src="/admin_store/scripts/jquery.validate.unobtrusive.js"></script>
}
@section body{
    <h1 class="rightH1 nav-fx">
        小程序分销 &gt; 代理管理 &gt; 代理商等级 &gt; 
		@if (Model.Id > 0)
		{
			<span class="rightH1-cur">编辑代理商等级</span>
		}
		else
		{
			<span class="rightH1-cur">添加代理商等级</span>
		}
        <div class="right">
            <a href="@Html.Raw(ViewData["referer"].ToString())" class="menuBT">返回列表</a>
            <div class="clear"></div>
        </div>
        <div class="clear"></div>
    </h1>

    @using (Html.BeginForm("AddOrEditDisGrade", "Distributor"))
    {
        @Html.HiddenFor(x => x.Id)
        @Html.HiddenFor(x => x.GradeType)
        <div class="addTable">
            <table width="100%">
                <tr>
                    <td style="width:150px" align="right">等级名称：</td>
                    <td>
                        @Html.TextBoxFor(x => x.Name, new { @class = "input", size = "35" })@Html.ValidationMessageFor(x => x.Name)

                    </td>
                </tr>
                <tr>
                    <td align="right">销售额满足点：</td>
                    <td>
                        @Html.TextBoxFor(x => x.BrokerageLimit, new { @class = "input", size = "3" })@Html.ValidationMessageFor(x => x.BrokerageLimit)
                        <span>设置代理商获得总销售额达到多少金额后，自动升级到此等级</span>
                    </td>
                </tr>
                <tr>
                    <td align="right">成交店铺佣金奖励：</td>
                    <td>
                        @Html.TextBoxFor(x => x.FirstBrokerageRise, new { @class = "input", size = "3" })%@Html.ValidationMessageFor(x => x.FirstBrokerageRise)
                        <span>设置代理商获得的所有下级分销商成交额的佣金比例</span>
                    </td>
                </tr>
               
                <tr>
                    <td align="right">说明：</td>
                    <td>
                        @Html.TextAreaFor(x => x.Description, new { @class = "input", size = "3", rows = "5", cols = "50" })

                    </td>
                </tr>
                <tr>
                    <td align="right">设成默认等级：</td>
                    <td>@if (Model.Id > 0)
                        {
                            @Html.CheckBoxFor(x => x.IsDefault, new {@class = "checkbox",@readonly="true"})
                        }
                        else
                        {
                            @Html.CheckBoxFor(x => x.IsDefault, new {@class = "checkbox"})
                        }
                        
                    </td>
                </tr>

                <tr>
                    <td align="right">&nbsp;</td>
                    <td>
                        <a href="" class="addBt" id="sumbitBut"><img src="/admin_store/images/submit.jpg" /></a>
                        <script type="text/javascript">
                            $(function () {
                                $("#sumbitBut").click(function () {
                                    $("form:first").submit();
                                    return false;
                                })
                            });
                        </script>
                    </td>
                </tr>
                <tr>
                    <td align="right">&nbsp;</td>
                    <td>&nbsp;</td>
                </tr>
            </table>
        </div>
    }
}